package com.gg.common.mapper;

import com.gg.common.pojo.MDesignProcedureModule;
import com.gg.hc.search.PageVo;

import java.util.List;

public interface MDesignProcedureModuleMapper {

    /**
     * 根据物料编号查询
     * @param productId
     * @return
     */
    int queryMDesignProcedureModuleByProductId(int productId);

    /**
     * 变更批量修改
     * @param id
     * @return
     */
    int deleteMDesignProcedureModule(List<MDesignProcedureModule> mDesignProcedureModules);
    /**
     * 根据父级id删除
     * @param parentId
     * @return
     */
    int deleteDesignModuleByParentId(Integer parentId);

    /**
     * 批量添加
     * @param mDesignProcedureModules
     * @return
     */
    int insertDModuleDetails(List<MDesignProcedureModule> mDesignProcedureModules);

    /**
     * 批量添加小计，本工序数量
     * @return
     */
    int updateDModuleDetails(List<MDesignProcedureModule> mDesignProcedureModules);

    /**
     * 根据父级编号查询
     * @param id
     * @return
     */
    List<MDesignProcedureModule> queryMDesignProcedureModuleByParentId(int id);

    /**
     * 根据id添加本工序量和小计
     * @param mDesignProcedureModule
     * @return
     */
    int AddMDesignProcedureModule(MDesignProcedureModule mDesignProcedureModule);

    /**
     * 条件查询，查询所有
     * @param pageVo
     * @return
     */
    List<MDesignProcedureModule> queryAll(PageVo pageVo);
    int deleteByPrimaryKey(Integer id);

    int insert(MDesignProcedureModule record);

    int insertSelective(MDesignProcedureModule record);

    MDesignProcedureModule selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(MDesignProcedureModule record);

    int updateByPrimaryKey(MDesignProcedureModule record);

    List<MDesignProcedureModule> queryByParentId(int[] i);
}